package zheezes.protocol.impl.gd.bean;

public abstract class AbstractMeterData {
	public abstract int size();
	
	public abstract int setBytes(byte[] buf, int offset, int max);
	
	public int setBytes(byte[] buf) {
		return setBytes(buf, 0, buf.length);
	}
	
	public abstract int getBytes(byte[] buf, int offset);
	
	public byte[] getBytes() {
		byte[] buf = new byte[size()];
		getBytes(buf, 0);
		return buf;
	}
}
